package com.ncloud.timetask.scheduler;

import com.ncloud.timetask.business.LatAndLngBusi;
import com.ncloud.timetask.dao.BaseDao;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * Created by shiqiang on 2017/7/13.
 */
@Component
public class LatAndLngScheduled {
    private final Logger logger = LoggerFactory.getLogger(this.getClass());
    @Autowired
    private LatAndLngBusi andLngBusi;
    @Autowired
    private BaseDao baseDao;
    @SuppressWarnings(value="unchecked")
    //@Scheduled(cron="0 0/30 * * * ?") //每天钟执行一次
    @Scheduled(cron="0 0/10 * * * ?") //每天钟执行一次
    public void statusCheck() {
        logger.debug("每天执行一次。开始……");
        andLngBusi.excute();
        logger.debug("每天执行一次。结束。");
    }

}
